import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import underGround from '../views/underGround1.vue'
let router=undefined
if(import.meta.env.VITE_APP_TITLE=='地下空间一张图'){
  router= createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes: [
   
      {
        path: '/',
        name: 'underGround',
        component: underGround
      },
      {
        path: '/',
        name: 'home',
        
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/underGround.vue'),
        // redirect:'/home',
        children:[
          // 例子
          // {
          //   path:"/frontPage",
          //   name:"frontPage",
          //   component: () => import('@/views/frontPage/frontPage.vue')
          // },
  
        ]
      }
    ]
  })
}else{
  router= createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes: [
   
      {
        path: '/underGround',
        name: 'underGround',
        component: underGround
      },
      {
        path: '/',
        name: 'home',
        
        // route level code-splitting
        // this generates a separate chunk (About.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import('../views/Home.vue'),
        // redirect:'/home',
        children:[
          // 例子
          // {
          //   path:"/frontPage",
          //   name:"frontPage",
          //   component: () => import('@/views/frontPage/frontPage.vue')
          // },
  
        ]
      }
    ]
  })
}


export default router
